<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="root">
    {{Name}}
    <button @click="name1='哇哈哈'">转换</button>
</div>
</body>
</html>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    new Vue({
        el:"#root",
        data:{
            name1:"李明",
        },
        computed:{
            Name:{
            get:function () {
return this.name1+"是狗"
            },
            set:function (a) {
// return a+"不是狗";
            }}
        }
    })
</script>